package com.jdiv.samples.arkanoid;


import com.jdiv.JProcess;

public class Ball extends JProcess {

	public boolean start=false;

	public int 
			vel=15;

	public int velX=0;

	public int velY=-vel;

	public int ang=0;
	
	public Ball(){
		super();
		file=Main.fpg_1;
		x=100;
		y=100;
		graph=1;
		angle=90000;
	}
	@Override
	public void begin() {}
	
	public void loop(){
		
		if (x<=0 || x>=800) velX*=-1;
		if (y<=0 || y>=600) velY*=-1;
		
		if (start){
			x+=velX;
			y+=velY;
		}
	
	}
	

}
